/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package controller;

import Utility.Utility;
import java.util.Iterator;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import xmlMapping.Category;
import xmlMapping.Forum;
import beans.CategoriesActionForm;
import java.util.Vector;
import xmlMapping.Member;
import xmlMapping.Post;

/**
 *
 * @author Ruba
 */
public class CategoriesAction extends org.apache.struts.action.Action {

  
    public ActionForward execute(ActionMapping mapping, ActionForm form,
            HttpServletRequest request, HttpServletResponse response)
            throws Exception {
        System.out.println("####statrt of action");
        Utility u=new Utility();
        List categories =u.getCategories();
        ((CategoriesActionForm)form).setCategories(categories);

        return mapping.findForward("categories");
    }
}
                                                                                                                                                                                        